<!-- 可获取微信openType的单元格 -->
<template>
	<view class="openCell">
		<button class="openButton" :open-type="openType" @getphonenumber="getData" @getuserinfo="getData">授权按钮</button>
		<view class="slot">
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			/* 授权字符串 */
			openType:{
				type:String,
				required:true
			}
		},
		methods:{
			getphonenumber(){
				
			},
			getData(res){
				/* 授权后回调 */
				this.$emit('getData',res);
			}
		}
	}
</script>

<style lang="scss" scoped>
	
	.openCell{
		position: relative;
		
		.openButton{
			position: absolute;
			z-index: 1000;
			width: 100%;
			height: 100%;
			opacity: 0;
		}
		
		.slot{
			position: relative;
			z-index: 100;
		}
	}
</style>
